package com.fortune.dao;

import com.fortune.dto.in.dStoreDeficit.DStoreDeficitAddDto;
import com.fortune.dto.in.dStoreDeficit.DStoreDeficitEditDto;
import com.fortune.dto.in.dStoreDeficit.DStoreDeficitInfoDto;
import com.fortune.dto.in.dStoreDeficit.DStoreDeficitListDto;
import com.fortune.dto.in.mStoreDeficit.MStoreDeficitListDto;
import com.fortune.vo.dStoreDeficit.DStoreDeficitInfo;
import com.fortune.vo.dStoreDeficit.DStoreDeficitInfoDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DStoreDeficitDao {

    /**
     * 新增报亏单base
     * @param companyId
     * @param uuid
     * @param uid
     * @param addDto
     * @return
     */
    int addDeficitBase(@Param("companyId") String companyId,@Param("dealerId") String dealerId, @Param("uuid") String uuid, @Param("uid") String uid, @Param("addDto") DStoreDeficitAddDto addDto);

    /**
     * 新增报亏单商品
     * @param companyId
     * @param uuid
     * @param infoDto
     * @return
     */
    int addDeficitDetail(@Param("companyId") String companyId,@Param("dealerId") String dealerId, @Param("uuid") String uuid, @Param("infoDto") DStoreDeficitInfoDto infoDto);

    /**
     * 查询报亏列表
     * @param companyId
     * @return
     */
    List<DStoreDeficitInfo> findDeficitList(@Param("companyId") String companyId, @Param("dealerId")String dealerId, @Param("dStoreDeficitListDto") DStoreDeficitListDto dStoreDeficitListDto);


    /**
     * 查询报亏列表数量
     * @param companyId
     * @param dStoreDeficitListDto
     * @return
     */
    int findDealerDeficitListCount(@Param("companyId") String companyId,@Param("dealerId")String dealerId, @Param("dStoreDeficitListDto") DStoreDeficitListDto dStoreDeficitListDto);


    /**
     * 查询报亏商品详情
     * @param companyId
     * @param deficitId
     * @return
     */
    DStoreDeficitInfoDetail findDealerDeficitInfo(@Param("companyId") String companyId,@Param("dealerId")String dealerId, @Param("deficitId") String deficitId);


    /**
     * 确认报亏
     * @param companyId
     * @param dealerId
     * @param uuid
     * @return
     */
    int editDStoreDeficitConfirm(@Param("companyId") String companyId,@Param("dealerId")String dealerId,@Param("operatorId")String operatorId, @Param("uuid") String uuid);

    /**
     * 删除
     * @param companyId
     * @param dealerId
     * @param uuid
     * @return
     */
    int deleteDStoreDeficit(@Param("companyId") String companyId,@Param("dealerId")String dealerId, @Param("uuid") String uuid);

    /**
     * 删除商品详情
     * @param companyId
     * @param dealerId
     * @param uuid
     * @return
     */
    int deleteInfo(@Param("companyId") String companyId,@Param("dealerId")String dealerId, @Param("uuid") String uuid);

    /**
     * 编辑报亏单base
     * @param companyId
     * @param editDto
     * @return
     */
    int editDeficitBase(@Param("companyId") String companyId,@Param("dealerId") String dealerId, @Param("editDto") DStoreDeficitEditDto editDto);


}
